package com.jinhongone.pattern.creater.factory.factory_method;




public class Test {

    public static void main(String[] args) {
        CoffeeStore coffeeStore = new CoffeeStore();
//        CoffeeFactory foctory = new AmericanFoctory();
        CoffeeFactory foctory = new LatteFactory();
        coffeeStore.setCoffeeFactory(foctory);
        Coffee coffee = coffeeStore.orderCoffee();
        System.out.println(coffee.getName());
    }
}
